<?php

    // +----------------------------------------------------------------------
    // | 访问记录
    // +----------------------------------------------------------------------
    // | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
    // +----------------------------------------------------------------------
    // | Author: 微尘 <yicmf@qq.com>
    // +----------------------------------------------------------------------

    namespace app\model\ucenter;

    class Visit extends Common
    {

		/**
		 * 写入修改
		 * @param $data
		 */
		public static function onBeforeInsert($data)
		{
			$data['status'] = 1;
			$data['hit'] = 1;
			$data['need_record'] = 0;
			$data['ip'] = request()->ip();
		}


		public function logs()
        {
            return $this->hasMany(VisitLog::class);
        }

    }
